wordpress get_permalink

76

get permalink by id wordpress -

<?php
if(count($related)) {
    echo "<div>Read More<ul>";
    foreach($related as $id) {
        echo '<li><a href="'.get_permalink( $id ).'">'.get_the_title( $id ).'</a></li>';
    }
    echo "</ul></div>";
  }
?>

the permlink wordpress -

<a href="<?php the_permalink(); ?>">permalink</a>

Comments

Submit
0 Comments